package com.itcast.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Configuration //标明配置类
@EnableSwagger2 //开启 Swagger2 的自动配置功能
//启动下服务，输入：http://localhost:8080/swagger-ui.html# 即可查看Swagger文档
public class SwaggerConfig {
    @Bean
    public Docket docket(){
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(new ApiInfoBuilder().title("tlias智能学习辅助系统").build());
    }
}
